// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import VueRouter from 'vue-router'
import VueResource from 'vue-resource'

import Home from './components/Home'
import Hello from './components/Hello'
import TimeEntries from './components/TimeEntries.vue'
import LogTime from './components/LogTime.vue'
// 注册两个插件
Vue.use(VueResource)
Vue.use(VueRouter)

const routes = [{
  path: '/',
  component: Home
},{
  path: '/home',
  component: Home
},{
  path: '/Hello',
  component: Hello
},{
  path: '/time-entries',
  component: TimeEntries,
  children : [{
    path : 'log-time',
    component : LogTime,
  }]
}];
const router = new VueRouter({ routes })

var app = new Vue({
  el: '#app',
  router,
  // store,
  ...App,
});


// router.start(App, '#app')

/* eslint-disable no-new */
